<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>添加员工</title>
</head>
<body>
<form th:action="@{/addEmp}" method="post">
    员工名字<input type="text" name="lastname"><br>
    邮箱<input type="text" name="email"><br>
    男<input type="radio" name="gender" value="1">
    女<input type="radio" name="gender" value="0">
    <!--    对象中的对象，提交其中一个属性-->
    部门<select  name="department.id">
        <option th:each="dept:${departments}" th:text="${dept.getDepartmentName()}" th:value="${dept.getId()}"></option>
        </select>
    生日<input type="text" name="birth">
    <input type="submit" value="添加">
    <p style="color: red"></p>

</form>
</body>
</html>
